<template>
  <div style="border: 1px solid black; padding: 10px">
    <div>子组件2</div>
  </div>
</template>
<script setup lang="ts">
import $bus from '../../eventBus/index'
//引入生命周期
import { onMounted } from 'vue'

onMounted(() => {
  $bus.on('car', (val) => {
    console.log('val --> ', val)
  })
})
</script>

<style scoped></style>
